
package bd;
import java.util.ArrayList;
import java.sql.*;
import javax.swing.JOptionPane;

/**
 *
 * @author Alan JPS
 */



public class Conexao {

   public static Connection abrir()
    {
       try{
          //Connection conexao = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","PROJETO_CHAMADO","PROJETO_CHAMADO");
          //Connection conexao = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","teste2","teste2");
           Connection conexao = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:xe","system","oracle");
          //Connection conexao = DriverManager.getConnection("jdbc:oracle:thin:@192.168.34.2","chamado","chamado");
           return conexao;
       }catch(Exception excecao)
       {
           JOptionPane.showMessageDialog(null, "Exceção: "+excecao.getMessage());
           return null;
       }
   }
}
